<?php
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">';
echo '<head>';
echo '<title>Download Lagu &#183; '.$_GET['q'].' Secara Gratis</title>';
echo '<meta name="HandheldFriendly" value="true" />';
echo '<link rel="stylesheet" href="http://putrasumatra.mw.lt/css/style/themes/Style8/style.css" type="text/css" />';
echo '<link rel="shortcut icon" href="http://www.warungmusik.info/favicon.ico" type="image/x-icon" />';

echo '</head> <body> <center>
<h1 class="header">Download Lagu '.$_GET['q'].' Secara Gratis</h1>
<h2 class="description">Pencarian Lagu by WarungMusik.Info</h2>
<div id="navigation">
</div></div>
<div id="top-content">
<div id="search-form">
<form method="get" action="'.$set_home.'">
<font color="red">Contoh Kata Kunci : NOAH / Separuh Aku / NOAH Separuh Aku</font><br/>
<font color="red">Cari MP3</font><br/>
<input class="inp-text" name="q" onblur="if(this.value==&#39;&#39;)this.value=this.defaultValue;" onfocus="if(this.value==this.defaultValue)this.value=&#39;&#39;;" type="text" value="Silahkan Masukkan Kata Kunci Disini.." size="50"/><br/>
<input class="inp-btn" type="submit" value="SEARCH" /> </form> </div> </div> </center>';

?>
<?php

if(isset($_GET['q'])){
$head=''.$_GET['q'].' Free Downloads';
}else{
$head=$set_name;
}

$uag = 'Opera/9.80 (Series 60; Opera Mini/6.5.28137/27.1662; U; en) Presto/2.8.119';

ini_set('user_agent',$uag."\r\naccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\naccept_charset: $_SERVER[HTTP_ACCEPT_CHARSET]\r\naccept_language: $_SERVER[HTTP_ACCEPT_LANGUAGE]");
if(isset($_GET['q'])){

$q=str_replace(' ','+',$_GET['q']);
}else{
$q = 'NOAH';
}

$link='http://www.lagu.mobi/index.php?source=4shared&search='.$q.'&page='.$_GET['start'].'';
$grab=file_get_contents($link);
$potong=explode("<div class='home'>",$grab);
$ganti=str_replace('(Ad)','',preg_replace('#<a href="http://www.ringtonematcher.com(.+?)</a>#','',$potong['0']));
$div=str_replace('<table id="products">','',str_replace('</table border="5">','', str_replace('</tr>','</div>',str_replace('</td>','</div>',str_replace('</p>','</h2>',str_replace('<td>','<div class="post-meta">', str_replace('<p>','<h2 class="title">',preg_replace('#<tr(.+?)>#','<div class="post">',$ganti))))))));
$atas=explode('</h5>',$div);
echo '<div id="content">';
$page=preg_replace('#<a href="http://lagu.mobi/index.php(.+?)source=4shared&amp;search=(.+?)&amp;page=(.+?)">#','<a href="?q=$2&start=$3">',str_replace('<b>','',str_replace('</b>','',str_replace("</li></ul><ul class='button-rounded'><li>",'',str_replace('</li></ul><br/>','</div>',str_replace("<br/><ul class='button-rounded'><li>",'<div id="pagination-links">', $atas['1']))))));
$page=str_replace('Download:', '', $page);
$page=str_replace('(', '<br/>(', $page);
echo '<div style="padding:2px"></div>'.$page.'';
echo '</div>';
?>